3.92 \(\int \cosh (c+d x) (a+b \tanh ^2(c+d x))^2 \, dx\)

Optimal. Leaf size=60 \[ \frac {(a+b)^2 \sinh (c+d x)}{d}-\frac {b (4 a+3 b) \tan ^{-1}(\sinh (c+d x))}{2 d}+\frac {b^2 \tanh (c+d x) \text {sech}(c+d x)}{2 d} \]

[Out]

-1/2*b*(4*a+3*b)*arctan(sinh(d*x+c))/d+(a+b)^2*sinh(d*x+c)/d+1/2*b^2*sech(d*x+c)*tanh(d*x+c)/d

________________________________________________________________________________________

Rubi [A]  time = 0.08, antiderivative size = 60, normalized size of antiderivative = 1.00, number of steps used = 5, number of rules used = 4, integrand size = 21, \(\frac {\text {number of rules}}{\text {integrand size}}\) = 0.190, Rules used = {3676, 390, 385, 203} \[ \frac {(a+b)^2 \sinh (c+d x)}{d}-\frac {b (4 a+3 b) \tan ^{-1}(\sinh (c+d x))}{2 d}+\frac {b^2 \tanh (c+d x) \text {sech}(c+d x)}{2 d} \]

Antiderivative was successfully verified.

[In]

Int[Cosh[c + d*x]*(a + b*Tanh[c + d*x]^2)^2,x]

[Out]

-(b*(4*a + 3*b)*ArcTan[Sinh[c + d*x]])/(2*d) + ((a + b)^2*Sinh[c + d*x])/d + (b^2*Sech[c + d*x]*Tanh[c + d*x])
/(2*d)

Rule 203

Int[((a_) + (b_.)*(x_)^2)^(-1), x_Symbol] :> Simp[(1*ArcTan[(Rt[b, 2]*x)/Rt[a, 2]])/(Rt[a, 2]*Rt[b, 2]), x] /;
 FreeQ[{a, b}, x] && PosQ[a/b] && (GtQ[a, 0] || GtQ[b, 0])

Rule 385

Int[((a_) + (b_.)*(x_)^(n_))^(p_)*((c_) + (d_.)*(x_)^(n_)), x_Symbol] :> -Simp[((b*c - a*d)*x*(a + b*x^n)^(p +
 1))/(a*b*n*(p + 1)), x] - Dist[(a*d - b*c*(n*(p + 1) + 1))/(a*b*n*(p + 1)), Int[(a + b*x^n)^(p + 1), x], x] /
; FreeQ[{a, b, c, d, n, p}, x] && NeQ[b*c - a*d, 0] && (LtQ[p, -1] || ILtQ[1/n + p, 0])

Rule 390

Int[((a_) + (b_.)*(x_)^(n_))^(p_)*((c_) + (d_.)*(x_)^(n_))^(q_), x_Symbol] :> Int[PolynomialDivide[(a + b*x^n)
^p, (c + d*x^n)^(-q), x], x] /; FreeQ[{a, b, c, d}, x] && NeQ[b*c - a*d, 0] && IGtQ[n, 0] && IGtQ[p, 0] && ILt
Q[q, 0] && GeQ[p, -q]

Rule 3676

Int[sec[(e_.) + (f_.)*(x_)]^(m_.)*((a_) + (b_.)*tan[(e_.) + (f_.)*(x_)]^(n_))^(p_.), x_Symbol] :> With[{ff = F
reeFactors[Sin[e + f*x], x]}, Dist[ff/f, Subst[Int[ExpandToSum[b*(ff*x)^n + a*(1 - ff^2*x^2)^(n/2), x]^p/(1 -
ff^2*x^2)^((m + n*p + 1)/2), x], x, Sin[e + f*x]/ff], x]] /; FreeQ[{a, b, e, f}, x] && IntegerQ[(m - 1)/2] &&
IntegerQ[n/2] && IntegerQ[p]

Rubi steps

\begin {align*} \int \cosh (c+d x) \left (a+b \tanh ^2(c+d x)\right )^2 \, dx &=\frac {\operatorname {Subst}\left (\int \frac {\left (a+(a+b) x^2\right )^2}{\left (1+x^2\right )^2} \, dx,x,\sinh (c+d x)\right )}{d}\\ &=\frac {\operatorname {Subst}\left (\int \left ((a+b)^2-\frac {b (2 a+b)+2 b (a+b) x^2}{\left (1+x^2\right )^2}\right ) \, dx,x,\sinh (c+d x)\right )}{d}\\ &=\frac {(a+b)^2 \sinh (c+d x)}{d}-\frac {\operatorname {Subst}\left (\int \frac {b (2 a+b)+2 b (a+b) x^2}{\left (1+x^2\right )^2} \, dx,x,\sinh (c+d x)\right )}{d}\\ &=\frac {(a+b)^2 \sinh (c+d x)}{d}+\frac {b^2 \text {sech}(c+d x) \tanh (c+d x)}{2 d}-\frac {(b (4 a+3 b)) \operatorname {Subst}\left (\int \frac {1}{1+x^2} \, dx,x,\sinh (c+d x)\right )}{2 d}\\ &=-\frac {b (4 a+3 b) \tan ^{-1}(\sinh (c+d x))}{2 d}+\frac {(a+b)^2 \sinh (c+d x)}{d}+\frac {b^2 \text {sech}(c+d x) \tanh (c+d x)}{2 d}\\ \end {align*}

________________________________________________________________________________________

Mathematica [A]  time = 0.18, size = 54, normalized size = 0.90 \[ \frac {2 (a+b)^2 \sinh (c+d x)+b \left (b \tanh (c+d x) \text {sech}(c+d x)-(4 a+3 b) \tan ^{-1}(\sinh (c+d x))\right )}{2 d} \]

Antiderivative was successfully verified.

[In]

Integrate[Cosh[c + d*x]*(a + b*Tanh[c + d*x]^2)^2,x]

[Out]

(2*(a + b)^2*Sinh[c + d*x] + b*(-((4*a + 3*b)*ArcTan[Sinh[c + d*x]]) + b*Sech[c + d*x]*Tanh[c + d*x]))/(2*d)

________________________________________________________________________________________

fricas [B]  time = 0.43, size = 774, normalized size = 12.90 \[ \frac {{\left (a^{2} + 2 \, a b + b^{2}\right )} \cosh \left (d x + c\right )^{6} + 6 \, {\left (a^{2} + 2 \, a b + b^{2}\right )} \cosh \left (d x + c\right ) \sinh \left (d x + c\right )^{5} + {\left (a^{2} + 2 \, a b + b^{2}\right )} \sinh \left (d x + c\right )^{6} + {\left (a^{2} + 2 \, a b + 3 \, b^{2}\right )} \cosh \left (d x + c\right )^{4} + {\left (15 \, {\left (a^{2} + 2 \, a b + b^{2}\right )} \cosh \left (d x + c\right )^{2} + a^{2} + 2 \, a b + 3 \, b^{2}\right )} \sinh \left (d x + c\right )^{4} + 4 \, {\left (5 \, {\left (a^{2} + 2 \, a b + b^{2}\right )} \cosh \left (d x + c\right )^{3} + {\left (a^{2} + 2 \, a b + 3 \, b^{2}\right )} \cosh \left (d x + c\right )\right )} \sinh \left (d x + c\right )^{3} - {\left (a^{2} + 2 \, a b + 3 \, b^{2}\right )} \cosh \left (d x + c\right )^{2} + {\left (15 \, {\left (a^{2} + 2 \, a b + b^{2}\right )} \cosh \left (d x + c\right )^{4} + 6 \, {\left (a^{2} + 2 \, a b + 3 \, b^{2}\right )} \cosh \left (d x + c\right )^{2} - a^{2} - 2 \, a b - 3 \, b^{2}\right )} \sinh \left (d x + c\right )^{2} - a^{2} - 2 \, a b - b^{2} - 2 \, {\left ({\left (4 \, a b + 3 \, b^{2}\right )} \cosh \left (d x + c\right )^{5} + 5 \, {\left (4 \, a b + 3 \, b^{2}\right )} \cosh \left (d x + c\right ) \sinh \left (d x + c\right )^{4} + {\left (4 \, a b + 3 \, b^{2}\right )} \sinh \left (d x + c\right )^{5} + 2 \, {\left (4 \, a b + 3 \, b^{2}\right )} \cosh \left (d x + c\right )^{3} + 2 \, {\left (5 \, {\left (4 \, a b + 3 \, b^{2}\right )} \cosh \left (d x + c\right )^{2} + 4 \, a b + 3 \, b^{2}\right )} \sinh \left (d x + c\right )^{3} + 2 \, {\left (5 \, {\left (4 \, a b + 3 \, b^{2}\right )} \cosh \left (d x + c\right )^{3} + 3 \, {\left (4 \, a b + 3 \, b^{2}\right )} \cosh \left (d x + c\right )\right )} \sinh \left (d x + c\right )^{2} + {\left (4 \, a b + 3 \, b^{2}\right )} \cosh \left (d x + c\right ) + {\left (5 \, {\left (4 \, a b + 3 \, b^{2}\right )} \cosh \left (d x + c\right )^{4} + 6 \, {\left (4 \, a b + 3 \, b^{2}\right )} \cosh \left (d x + c\right )^{2} + 4 \, a b + 3 \, b^{2}\right )} \sinh \left (d x + c\right )\right )} \arctan \left (\cosh \left (d x + c\right ) + \sinh \left (d x + c\right )\right ) + 2 \, {\left (3 \, {\left (a^{2} + 2 \, a b + b^{2}\right )} \cosh \left (d x + c\right )^{5} + 2 \, {\left (a^{2} + 2 \, a b + 3 \, b^{2}\right )} \cosh \left (d x + c\right )^{3} - {\left (a^{2} + 2 \, a b + 3 \, b^{2}\right )} \cosh \left (d x + c\right )\right )} \sinh \left (d x + c\right )}{2 \, {\left (d \cosh \left (d x + c\right )^{5} + 5 \, d \cosh \left (d x + c\right ) \sinh \left (d x + c\right )^{4} + d \sinh \left (d x + c\right )^{5} + 2 \, d \cosh \left (d x + c\right )^{3} + 2 \, {\left (5 \, d \cosh \left (d x + c\right )^{2} + d\right )} \sinh \left (d x + c\right )^{3} + 2 \, {\left (5 \, d \cosh \left (d x + c\right )^{3} + 3 \, d \cosh \left (d x + c\right )\right )} \sinh \left (d x + c\right )^{2} + d \cosh \left (d x + c\right ) + {\left (5 \, d \cosh \left (d x + c\right )^{4} + 6 \, d \cosh \left (d x + c\right )^{2} + d\right )} \sinh \left (d x + c\right )\right )}} \]

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate(cosh(d*x+c)*(a+b*tanh(d*x+c)^2)^2,x, algorithm="fricas")

[Out]

1/2*((a^2 + 2*a*b + b^2)*cosh(d*x + c)^6 + 6*(a^2 + 2*a*b + b^2)*cosh(d*x + c)*sinh(d*x + c)^5 + (a^2 + 2*a*b
+ b^2)*sinh(d*x + c)^6 + (a^2 + 2*a*b + 3*b^2)*cosh(d*x + c)^4 + (15*(a^2 + 2*a*b + b^2)*cosh(d*x + c)^2 + a^2
 + 2*a*b + 3*b^2)*sinh(d*x + c)^4 + 4*(5*(a^2 + 2*a*b + b^2)*cosh(d*x + c)^3 + (a^2 + 2*a*b + 3*b^2)*cosh(d*x
+ c))*sinh(d*x + c)^3 - (a^2 + 2*a*b + 3*b^2)*cosh(d*x + c)^2 + (15*(a^2 + 2*a*b + b^2)*cosh(d*x + c)^4 + 6*(a
^2 + 2*a*b + 3*b^2)*cosh(d*x + c)^2 - a^2 - 2*a*b - 3*b^2)*sinh(d*x + c)^2 - a^2 - 2*a*b - b^2 - 2*((4*a*b + 3
*b^2)*cosh(d*x + c)^5 + 5*(4*a*b + 3*b^2)*cosh(d*x + c)*sinh(d*x + c)^4 + (4*a*b + 3*b^2)*sinh(d*x + c)^5 + 2*
(4*a*b + 3*b^2)*cosh(d*x + c)^3 + 2*(5*(4*a*b + 3*b^2)*cosh(d*x + c)^2 + 4*a*b + 3*b^2)*sinh(d*x + c)^3 + 2*(5
*(4*a*b + 3*b^2)*cosh(d*x + c)^3 + 3*(4*a*b + 3*b^2)*cosh(d*x + c))*sinh(d*x + c)^2 + (4*a*b + 3*b^2)*cosh(d*x
 + c) + (5*(4*a*b + 3*b^2)*cosh(d*x + c)^4 + 6*(4*a*b + 3*b^2)*cosh(d*x + c)^2 + 4*a*b + 3*b^2)*sinh(d*x + c))
*arctan(cosh(d*x + c) + sinh(d*x + c)) + 2*(3*(a^2 + 2*a*b + b^2)*cosh(d*x + c)^5 + 2*(a^2 + 2*a*b + 3*b^2)*co
sh(d*x + c)^3 - (a^2 + 2*a*b + 3*b^2)*cosh(d*x + c))*sinh(d*x + c))/(d*cosh(d*x + c)^5 + 5*d*cosh(d*x + c)*sin
h(d*x + c)^4 + d*sinh(d*x + c)^5 + 2*d*cosh(d*x + c)^3 + 2*(5*d*cosh(d*x + c)^2 + d)*sinh(d*x + c)^3 + 2*(5*d*
cosh(d*x + c)^3 + 3*d*cosh(d*x + c))*sinh(d*x + c)^2 + d*cosh(d*x + c) + (5*d*cosh(d*x + c)^4 + 6*d*cosh(d*x +
 c)^2 + d)*sinh(d*x + c))

________________________________________________________________________________________

giac [B]  time = 0.25, size = 137, normalized size = 2.28 \[ -\frac {2 \, {\left (4 \, a b e^{c} + 3 \, b^{2} e^{c}\right )} \arctan \left (e^{\left (d x + c\right )}\right ) e^{\left (-c\right )} + {\left (a^{2} + 2 \, a b + b^{2}\right )} e^{\left (-d x - c\right )} - {\left (a^{2} e^{\left (d x + 8 \, c\right )} + 2 \, a b e^{\left (d x + 8 \, c\right )} + b^{2} e^{\left (d x + 8 \, c\right )}\right )} e^{\left (-7 \, c\right )} - \frac {2 \, {\left (b^{2} e^{\left (3 \, d x + 3 \, c\right )} - b^{2} e^{\left (d x + c\right )}\right )}}{{\left (e^{\left (2 \, d x + 2 \, c\right )} + 1\right )}^{2}}}{2 \, d} \]

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate(cosh(d*x+c)*(a+b*tanh(d*x+c)^2)^2,x, algorithm="giac")

[Out]

-1/2*(2*(4*a*b*e^c + 3*b^2*e^c)*arctan(e^(d*x + c))*e^(-c) + (a^2 + 2*a*b + b^2)*e^(-d*x - c) - (a^2*e^(d*x +
8*c) + 2*a*b*e^(d*x + 8*c) + b^2*e^(d*x + 8*c))*e^(-7*c) - 2*(b^2*e^(3*d*x + 3*c) - b^2*e^(d*x + c))/(e^(2*d*x
 + 2*c) + 1)^2)/d

________________________________________________________________________________________

maple [B]  time = 0.31, size = 122, normalized size = 2.03 \[ \frac {a^{2} \sinh \left (d x +c \right )}{d}+\frac {2 a b \sinh \left (d x +c \right )}{d}-\frac {4 a b \arctan \left ({\mathrm e}^{d x +c}\right )}{d}+\frac {b^{2} \left (\sinh ^{3}\left (d x +c \right )\right )}{d \cosh \left (d x +c \right )^{2}}+\frac {3 b^{2} \sinh \left (d x +c \right )}{d \cosh \left (d x +c \right )^{2}}-\frac {3 b^{2} \mathrm {sech}\left (d x +c \right ) \tanh \left (d x +c \right )}{2 d}-\frac {3 b^{2} \arctan \left ({\mathrm e}^{d x +c}\right )}{d} \]

Verification of antiderivative is not currently implemented for this CAS.

[In]

int(cosh(d*x+c)*(a+b*tanh(d*x+c)^2)^2,x)

[Out]

a^2*sinh(d*x+c)/d+2*a*b*sinh(d*x+c)/d-4/d*a*b*arctan(exp(d*x+c))+1/d*b^2*sinh(d*x+c)^3/cosh(d*x+c)^2+3/d*b^2*s
inh(d*x+c)/cosh(d*x+c)^2-3/2/d*b^2*sech(d*x+c)*tanh(d*x+c)-3/d*b^2*arctan(exp(d*x+c))

________________________________________________________________________________________

maxima [B]  time = 0.45, size = 152, normalized size = 2.53 \[ \frac {1}{2} \, b^{2} {\left (\frac {6 \, \arctan \left (e^{\left (-d x - c\right )}\right )}{d} - \frac {e^{\left (-d x - c\right )}}{d} + \frac {4 \, e^{\left (-2 \, d x - 2 \, c\right )} - e^{\left (-4 \, d x - 4 \, c\right )} + 1}{d {\left (e^{\left (-d x - c\right )} + 2 \, e^{\left (-3 \, d x - 3 \, c\right )} + e^{\left (-5 \, d x - 5 \, c\right )}\right )}}\right )} + a b {\left (\frac {4 \, \arctan \left (e^{\left (-d x - c\right )}\right )}{d} + \frac {e^{\left (d x + c\right )}}{d} - \frac {e^{\left (-d x - c\right )}}{d}\right )} + \frac {a^{2} \sinh \left (d x + c\right )}{d} \]

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate(cosh(d*x+c)*(a+b*tanh(d*x+c)^2)^2,x, algorithm="maxima")

[Out]

1/2*b^2*(6*arctan(e^(-d*x - c))/d - e^(-d*x - c)/d + (4*e^(-2*d*x - 2*c) - e^(-4*d*x - 4*c) + 1)/(d*(e^(-d*x -
 c) + 2*e^(-3*d*x - 3*c) + e^(-5*d*x - 5*c)))) + a*b*(4*arctan(e^(-d*x - c))/d + e^(d*x + c)/d - e^(-d*x - c)/
d) + a^2*sinh(d*x + c)/d

________________________________________________________________________________________

mupad [B]  time = 0.24, size = 182, normalized size = 3.03 \[ \frac {{\mathrm {e}}^{c+d\,x}\,{\left (a+b\right )}^2}{2\,d}-\frac {{\mathrm {e}}^{-c-d\,x}\,{\left (a+b\right )}^2}{2\,d}-\frac {\mathrm {atan}\left (\frac {{\mathrm {e}}^{d\,x}\,{\mathrm {e}}^c\,\left (3\,b^2\,\sqrt {d^2}+4\,a\,b\,\sqrt {d^2}\right )}{d\,\sqrt {16\,a^2\,b^2+24\,a\,b^3+9\,b^4}}\right )\,\sqrt {16\,a^2\,b^2+24\,a\,b^3+9\,b^4}}{\sqrt {d^2}}+\frac {b^2\,{\mathrm {e}}^{c+d\,x}}{d\,\left ({\mathrm {e}}^{2\,c+2\,d\,x}+1\right )}-\frac {2\,b^2\,{\mathrm {e}}^{c+d\,x}}{d\,\left (2\,{\mathrm {e}}^{2\,c+2\,d\,x}+{\mathrm {e}}^{4\,c+4\,d\,x}+1\right )} \]

Verification of antiderivative is not currently implemented for this CAS.

[In]

int(cosh(c + d*x)*(a + b*tanh(c + d*x)^2)^2,x)

[Out]

(exp(c + d*x)*(a + b)^2)/(2*d) - (exp(- c - d*x)*(a + b)^2)/(2*d) - (atan((exp(d*x)*exp(c)*(3*b^2*(d^2)^(1/2)
+ 4*a*b*(d^2)^(1/2)))/(d*(24*a*b^3 + 9*b^4 + 16*a^2*b^2)^(1/2)))*(24*a*b^3 + 9*b^4 + 16*a^2*b^2)^(1/2))/(d^2)^
(1/2) + (b^2*exp(c + d*x))/(d*(exp(2*c + 2*d*x) + 1)) - (2*b^2*exp(c + d*x))/(d*(2*exp(2*c + 2*d*x) + exp(4*c
+ 4*d*x) + 1))

________________________________________________________________________________________

sympy [F]  time = 0.00, size = 0, normalized size = 0.00 \[ \int \left (a + b \tanh ^{2}{\left (c + d x \right )}\right )^{2} \cosh {\left (c + d x \right )}\, dx \]

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate(cosh(d*x+c)*(a+b*tanh(d*x+c)**2)**2,x)

[Out]

Integral((a + b*tanh(c + d*x)**2)**2*cosh(c + d*x), x)

________________________________________________________________________________________